ns16550: delay resume until dom0 ACPI has a chance to run
authorBen Guthro <benjamin.guthro@citrix.com>
Wed, 24 Apr 2013 09:41:53 +0000 (11:41 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 24 Apr 2013 09:41:53 +0000 (11:41 +0200)
commit6e96c186d23873597896051b043cfeb119c4a7d5
tree28cf07f1300be3a5a56d0764f3cbaf9927a6cf74
parent3f28d0077788e7f8cd3ee25b023a4225d7e26e87
ns16550: delay resume until dom0 ACPI has a chance to run

Check for ioport access, before fully resuming operation, to avoid
spinning in __ns16550_poll when reading the LSR register returns 0xFF
on failing ioport access.

On some systems (like Lenovo T410, and some HP machines of similar vintage)
there is a SuperIO card that provides this legacy ioport on the LPC bus.

In this case, we need to wait for dom0's ACPI processing to run the proper
AML to re-initialize the chip, before we can use the card again.

This may cause a small amount of garbage to be written to the serial log
while we wait patiently for that AML to be executed.

This implementation limits the number of retries, to avoid a situation
where we keep trying over and over again, in the case of some other failure
on the ioport.

Signed-Off-By: Ben Guthro <benjamin.guthro@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/drivers/char/ns16550.c